package org.jeecg.modules.service;

import com.alibaba.fastjson.JSONObject;
import org.jeecg.modules.temporary.entity.DiyTemporaryApplicantInfo;
import org.jeecg.modules.vo.ProfessorChoose;

/**
 * @author ZhangHaoyu
 * @description
 * @date 2020/6/1 14:22
 */
public interface CallbackService {
    /**
     * 根据unionid获取userid
     * @param username
     * @return
     */
     String selUserIdByUnionid(String username);


    /**
     * 调用钉钉接口，根据审核实例id获取内容
     * @param processInstanceId
     * @return
     */
    String getInfoById(String processInstanceId);

    /**
     * 发送专家转正审批到钉钉上
     * @param diyTemporaryApplicantInfo
     * @return
     */
    String sendToDingTalk(DiyTemporaryApplicantInfo diyTemporaryApplicantInfo, String userId);

    /**
     *给项目所需的专家发送抽取文件
     * @param professorChoose
     * @param originatorUserId  发起人id
     * @param approvers 审配人id
     * @return
     */
    String sendProfessorChooseToDingTalk(ProfessorChoose professorChoose,String originatorUserId,String approvers);

    /**
     * 根据userid获取unionid
     * @param originator_userid
     * @return
     */
    String getUnionIdByUserId(String originator_userid);

    /**
     * 根据userid获取uid，通过unionid转换
     * @param originator_userid
     * @return
     */
    String getUidByUserId(String originator_userid);

    /**
     * 从数据库获取unionid
     * @param originator_userid
     * @return
     */
    String getUnionIdByUserIdFromDB(String originator_userid);

    /**
     * 发送紧急请假原因到钉钉上
     * @param jsonObject
     */
    void sendLeaveCauseToDing(JSONObject jsonObject);
}
